﻿# -*- coding: utf-8 -*--

import GlobalSetting
import HandleWrapper
import WorldEditor
import TranslationTool
import RotationTool
import ScaleTool
import History
import Builder
import ParticleSystemEditor
import TerrainEditor
import LogicGridEditor

import wx

def dword_to_wxColor(dword):
    a = dword >> 24
    r = int((dword & 0x00ff0000) >> 16)
    g = int((dword & 0x0000ff00) >> 8)
    b = int((dword & 0x000000ff))
    return wx.Color(r, g, b, a)
    
def wxColor_to_dword(color):
    a = color.Alpha()
    r = color.Red()
    g = color.Green()
    b = color.Blue()
    return (a << 24) | (r << 16) | (g << 8) | b
    
__builtins__['DWORD_TO_WXCOLOR'] = dword_to_wxColor
__builtins__['WXCOLOR_TO_DWORD'] = wxColor_to_dword